package com.ctsi.ssdc.service.impl.front;

import com.ctsi.ssdc.mapper.TradeAndServiceMapper1;
import com.ctsi.ssdc.service.front.TradeAndServiceService1;
import com.ctsi.ssdc.entity.SocialRetailSales;
import com.ctsi.ssdc.entity.TradeAndServiceIndustry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TradeAndServiceService1Impl implements TradeAndServiceService1 {
    @Autowired
    TradeAndServiceMapper1 tradeAndServiceMapper1;

    /**
     * 分区镇社会消费品零售总额
     * @param year 年份
     * @param month 月份
     * @return List<SocialRetailSales>
     */
    @Override
    public List<SocialRetailSales> getSocialRetailSales(int year, int month) {
        return tradeAndServiceMapper1.getSocialRetailSales(year,month);
    }

    /**
     * 限上批发业销售额
     * 限上零售业销售额
     * 限上住宿业营业额
     * 限上餐饮业营业额
     * 交通及营利性服务业营业额
     * 房地产销售收入
     * 房地产销售面积（万平方米）
     * @param year 年份
     * @param indicators 指标
     * @return List<TradeAndServiceIndustry>
     */
    @Override
    public List<TradeAndServiceIndustry> getTradeAndServiceByIndicators(int year, String indicators) {
        return tradeAndServiceMapper1.getTradeAndServiceByIndicators(year, indicators);
    }


    /**
     * 头标：当月及当月累计
     * @param year 年份，month 月份, indicators 指标
     *@return TradeAndServiceIndustry
     */
    @Override
    public TradeAndServiceIndustry getMonthProduct(int year, int month, String indicators) {
        return tradeAndServiceMapper1.findMonthProduct(year, month, indicators);
    }
}
